package com.ganbo.pattern.decorator;

/**
 * Created by gan on 2020/12/5 23:25.
 */
public abstract class BattercakeDecorator extends Battercake {

    //静态代理，委派
    private Battercake battercake;


    public BattercakeDecorator(Battercake battercake) {
        this.battercake = battercake;
    }


    @Override
    protected String getMsg() {
        return battercake.getMsg();
    }

    @Override
    public int getPrice() {
        return battercake.getPrice();
    }


}
